<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>display显示类型</title>
</head>
<body>
    <div class="circle">
        <p>1</p>
        <p>2</p>
        <p>3</p>
        <p>4</p>
        <p>5</p>
        <p>6</p>
        <p>7</p>
        <p>8</p>
        <p>9</p>
        <p>10</p>
        <p>11</p>
        <p>12</p>
        <p>13</p>
        <p>14</p>
        <p>15</p>
        <p>16</p>
        <p>17</p>
        <p>18</p>
        <p>19</p>
        <p>20</p>
        <p>21</p>
    </div>
</body>
<style>
    p{display: inline-block;}
    p:nth-child(2n){
        background-color: red;
        color: white;
        width: 50px;
        height: 52px;
        border-radius: 50%;
        border: 2px gray solid;
    }
    p{
        text-align: center;
        line-height: 50px;
    }
    p:nth-child(2n+1){
background-color: blue;
color: white;
width: 50px;
height: 50px;
border-radius: 50%;
border:2px grey solid;
    }
</style>
</html>